from paddlex import create_pipeline
def ocr(file_url):
    pipeline = create_pipeline(pipeline="OCR")
    output = pipeline.predict(file_url)
    for res in output:
        res.print()

        return res["rec_text"]


class ocrService:
    def ocr_identify(self, file_url):
        output = ocr(file_url)
        return output